// Vue2

// Vue3
// 骨架屏组件
import Skeleton from './Skeleton'
// 轮播图组件
import Slider from './Slider'
// 更多组件
import More from './More'
// 面包屑组件
import Bread from './Bread/index.vue'
import BreadItem from './Bread/Item.vue'
// 上拉无线加载组件
import InfiniteLoad from './InfiniteLoad'
import ImageView from './ImageView'
import City from './City'
// 数量组件
import Numbox from './Numbox'
// 加入购物车按钮
import Button from './Button'
// 消息提示组件
import Message from './Message/index.vue'
// 复选框组件
import Checkbox from './CheckBox'
// 消息对话框组件
import Dialog from './Dialog'
// 标签页组件
// import Tabs from './Tabs/index.vue'
// import TabPanel from './Tabs/panel.vue'

// 图片懒加载指令
import { lazyload } from '@/directive'
export default {
  install (app) {
    // console.log(app)
    // console.log('自定义插件被调用了')
    // app整个项目的应用实例
    // 1.注册全局组件
    app.component(Skeleton.name, Skeleton)
    app.component(Slider.name, Slider)
    app.component(More.name, More)
    app.component(Bread.name, Bread)
    app.component(BreadItem.name, BreadItem)
    app.component(InfiniteLoad.name, InfiniteLoad)
    app.component(ImageView.name, ImageView)
    app.component(City.name, City)
    app.component(Numbox.name, Numbox)
    app.component(Button.name, Button)
    app.component(Message.name, Message)
    app.component(Checkbox.name, Checkbox)
    app.component(Dialog.name, Dialog)
    // app.component(Tabs.name, Tabs)
    // app.component(TabPanel.name, TabPanel)
    // 2. 自定义全局指令
    // 图片懒加载指令
    app.directive('lazyload', lazyload)
  }
}
